package com.caocaog.market.applets;

import com.caocaog.market.annotation.IgnoreAuth;
import com.caocaog.market.entity.ShopType;
import com.caocaog.market.entity.dto.ShopTypeTree;
import com.caocaog.market.service.ShopTypeService;
import lombok.extern.slf4j.Slf4j;
import org.jeecg.common.api.vo.Result;
import org.jeecg.common.system.base.controller.GenericController;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * 店铺分类
 *
 * @author chechen
 * @date 2022-12-11
 */
@Slf4j
@RestController
@RequestMapping("/api/shopType")
public class ShopTypeApiController extends GenericController<ShopType, ShopTypeService> {

    public static final String TABLE_MEANING = "店铺加价配置 - ";


    @IgnoreAuth
    @GetMapping(value = "/getTree")
    public Result<List<ShopTypeTree>> getShopTypeTree(@RequestParam String siteId) {
        return Result.OK(super.service.getShopTypeTree(siteId, false));
    }

}
